/**
 * @author zj
 *
 * @desc:
 * @date: 2024/8/12 12
 */
import path from "path";
const serve = {
  baseURL: "http://127.0.0.1:9090",//localhost=127.0.0.1
  // baseURL: "http://192.168.31.107:9090",
};

const projectConfig = {
  serve,
  // 服务端口
  port: 7000,
  // 局域网访问
  // host: "0.0.0.0",
  alias: {
    "@": path.resolve(__dirname, "src"),
    "@api": path.resolve(__dirname, "./src/request/api"),
    "@assets": path.resolve(__dirname, "./src/assets"),
    "@components": path.resolve(__dirname, "./src/components"),
    "@views": path.resolve(__dirname, "./src/views"),
    "@store": path.resolve(__dirname, "./src/store"),
    "@utils": path.resolve(__dirname, "./src/utils"),
  },

  proxy: {
    "/api": {
      target: serve.baseURL,
      changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
    },
  },
};

export default projectConfig;
